Skip to content

Conversation

@JamieDanielson
Copy link
Member

@JamieDanielson JamieDanielson commented Oct 27, 2025

Which problem is this PR solving?

Short description of the changes

Add generation script that generates types based on the otel config schema, using a tool called json-schema-to-typescript. These types are intended to be used in the configuration package instead of us handrolling the types.

TODO:

  • add type definitions
  • [try to] separate into individual files similar to upstream
  • update to use main upstream repo once pr is merged

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Ran the script and confirmed generated types were created

@codecov
Copy link

codecov bot commented Oct 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.16%. Comparing base (e460f03) to head (d8336e1).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6053   +/-   ##
=======================================
  Coverage   95.16%   95.16%           
=======================================
  Files         316      316           
  Lines        9207     9207           
  Branches     2075     2075           
=======================================
  Hits         8762     8762           
  Misses        445      445           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry if this review is premature since the PR is still in draft.

used claude to help with this.
there's a good chance there's still extra
fluff that needs sorting through.

also still need to sort out the weird
union behavior. we may need to maintain
a fork with the fixes if they dont get
merged upstream.
@JamieDanielson
Copy link
Member Author

@cjihrig thanks for the early feedback! I've made adjustments based on your comments so far.

* types are in a new file upstream.
* still looking at how to reduce redundancy
in intersection types generated by json2ts,
for now fix in post-processing step.
* temp todo for incorrect casing on otel type.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generate configuration model from schema spec

2 participants